package com.wzc;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;

import javax.servlet.annotation.WebListener;


// 声明当前类是SpringBoot项目启动类，@EnableAutoConfiguration（自动配置）和@ComponentScan（扫面当前包及其子包）的复合注解
@SpringBootApplication
@MapperScan("com.wzc.*.mapper") // 扫描mapper接口的包，生成mapper代理对象，在service注入

// 启动时就加载监听器 listener
@ServletComponentScan(value = {"com.wzc.basic.listener"})
public class PetHomeApp {
    public static void main(String[] args) {

        // 使用启动类去运行Spring程序
        SpringApplication.run(PetHomeApp.class,args);
    }

}
